home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form ScaleDemo
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "Knob Scale Properties Demo"
- ClientHeight = 3870
- ClientLeft = 2925
- ClientTop = 3345
- ClientWidth = 8325
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 4275
- Left = 2865
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 258
- ScaleMode = 3 'Pixel
- ScaleWidth = 555
- Top = 3000
- Width = 8445
- Begin Frame Frame1
- BackColor = &H00C0C0C0&
- Caption = "Scale Angle Properties"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 885
- Index = 2
- Left = 3930
- TabIndex = 18
- Top = 2835
- Width = 4275
- Begin HScrollBar HScroll1
- Height = 240
- Index = 4
- Left = 1635
- Max = 360
- TabIndex = 0
- Top = 300
- Width = 2000
- End
- Begin HScrollBar HScroll1
- Height = 240
- Index = 5
- Left = 1635
- Max = 360
- TabIndex = 1
- Top = 540
- Width = 2000
- End
- Begin Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "0"
- Height = 195
- Index = 4
- Left = 3735
- TabIndex = 2
- Top = 315
- Width = 120
- End
- Begin Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "0"
- Height = 195
- Index = 5
- Left = 3735
- TabIndex = 3
- Top = 555
- Width = 120
- End
- Begin Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "ScaleStartAngle:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 210
- Index = 4
- Left = 375
- TabIndex = 4
- Top = 315
- Width = 1215
- End
- Begin Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "ScaleStopAngle:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 210
- Index = 5
- Left = 390
- TabIndex = 5
- Top = 555
- Width = 1200
- End
- End
- Begin Frame Frame1
- BackColor = &H00C0C0C0&
- Caption = "Scale Origin Properties"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 885
- Index = 1
- Left = 3930
- TabIndex = 17
- Top = 1875
- Width = 4275
- Begin HScrollBar HScroll1
- Height = 240
- Index = 2
- Left = 1650
- Max = 140
- Min = -140
- TabIndex = 6
- Top = 270
- Width = 2000
- End
- Begin HScrollBar HScroll1
- Height = 240
- Index = 3
- Left = 1650
- Max = 140
- Min = -140
- TabIndex = 7
- Top = 510
- Width = 2000
- End
- Begin Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "0"
- Height = 195
- Index = 2
- Left = 3750
- TabIndex = 8
- Top = 270
- Width = 120
- End
- Begin Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "0"
- Height = 195
- Index = 3
- Left = 3750
- TabIndex = 9
- Top = 510
- Width = 120
- End
- Begin Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "ScaleOriginX:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 210
- Index = 2
- Left = 615
- TabIndex = 10
- Top = 285
- Width = 975
- End
- Begin Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "ScaleOriginY:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 210
- Index = 3
- Left = 615
- TabIndex = 11
- Top = 525
- Width = 990
- End
- End
- Begin Frame Frame1
- BackColor = &H00C0C0C0&
- Caption = "Scale Value Properties"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 885
- Index = 0
- Left = 3930
- TabIndex = 16
- Top = 960
- Width = 4275
- Begin HScrollBar HScroll1
- Height = 240
- Index = 0
- Left = 1665
- Max = 100
- TabIndex = 20
- Top = 300
- Width = 2000
- End
- Begin HScrollBar HScroll1
- Height = 240
- Index = 1
- Left = 1665
- Max = 100
- TabIndex = 19
- Top = 540
- Width = 2000
- End
- Begin Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "0"
- Height = 195
- Index = 0
- Left = 3765
- TabIndex = 24
- Top = 315
- Width = 120
- End
- Begin Label Label2
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "0"
- Height = 195
- Index = 1
- Left = 3765
- TabIndex = 23
- Top = 555
- Width = 120
- End
- Begin Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "ScaleMaxValue:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 210
- Index = 0
- Left = 450
- TabIndex = 22
- Top = 315
- Width = 1170
- End
- Begin Label Label1
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "ScaleMinValue:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 210
- Index = 1
- Left = 495
- TabIndex = 21
- Top = 555
- Width = 1110
- End
- End
- Begin KNOB Knob1
- Angle = 0
- AutoRedraw = -1 'True
- AVersion = 2.5
- BackgroundColor = &H00C0C0C0&
- BevelInner = 2 ' 2 - Inset
- BevelOuter = 2 ' 2 - Inset
- BevelWidth = 2
- BorderType = 1 ' 1 - Bevel
- BorderWidth = 2
- Digital = 0 'False
- DigitalColor = &H00000000&
- DigitalDecimals = 0
- DigitalFontID = 0
- DigitalX = 0
- DigitalY = 0
- FontID = 0
- FrameColor = &H00000000&
- FrameScaleX = 0
- FrameScaleY = 0
- FrameStyle = 0 ' 0 - None
- Height = 3690
- KnobColor = &H000000C0&
- KnobMultiTurn = 0 'False
- KnobMultiTurnValue= 0
- KnobRadius = 0.6
- KnobSnap = 0 'False
- KnobSnapIncrement= 1
- KnobStyle = 2 ' 2 - Complex
- KnobUserDefined = ""
- KnobValue = 0
- Left = 45
- MarkUserDefined = ""
- MouseControl = -1 'True
- OutlineAlign = 0 ' 0 - Left
- OutlineColor = &H00000000&
- OutlineTitle = ""
- OutlineWidth = 0
- Radius = 0
- TabIndex = 15
- Top = 15
- Value = 0
- Width = 3810
- XScale = 0
- YScale = 0
- ZLoad = KSCALES.FRX:0000
- End
- Begin Frame Frame2
- BackColor = &H00C0C0C0&
- Caption = "ScaleDirection Property"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 855
- Left = 3930
- TabIndex = 12
- Top = 45
- Width = 2385
- Begin OptionButton Option2
- BackColor = &H00C0C0C0&
- Caption = "CounterClockwise"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 225
- Index = 1
- Left = 210
- TabIndex = 14
- TabStop = 0 'False
- Top = 510
- Width = 1650
- End
- Begin OptionButton Option2
- BackColor = &H00C0C0C0&
- Caption = "Clockwise"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 225
- Index = 0
- Left = 210
- TabIndex = 13
- Top = 270
- Value = -1 'True
- Width = 1350
- End
- End
- Sub Form_Load ()
- hscroll1(0) = knob1.ScaleMaxValue
- hscroll1(1) = knob1.ScaleMinValue
- hscroll1(2) = knob1.ScaleOriginX * 100
- hscroll1(3) = knob1.ScaleOriginY * 100
- hscroll1(4) = knob1.ScaleStartAngle
- hscroll1(5) = knob1.ScaleStopAngle
- option2(knob1.ScaleDirection) = True
- End Sub
- Sub HScroll1_Change (Index As Integer)
- Select Case Index
- Case 0
- If (hscroll1(0) > knob1.ScaleMinValue) Then
- knob1.ScaleMaxValue = hscroll1(0)
- knob1.TicStopValue = knob1.ScaleMaxValue + .1
- Else
- hscroll1(0) = knob1.ScaleMaxValue
- End If
- label2(0) = knob1.ScaleMaxValue
- Case 1
- If (hscroll1(1) < knob1.ScaleMaxValue) Then
- knob1.ScaleMinValue = hscroll1(1)
- knob1.TicStartValue = knob1.ScaleMinValue
- Else
- hscroll1(1) = knob1.ScaleMinValue
- End If
- label2(1) = knob1.ScaleMinValue
- Case 2
- knob1.ScaleOriginX = hscroll1(2) / 100
- label2(2) = hscroll1(2) / 100
- Case 3
- knob1.ScaleOriginY = hscroll1(3) / 100
- label2(3) = hscroll1(3) / 100
- Case 4
- knob1.ScaleStartAngle = hscroll1(4)
- label2(4) = hscroll1(4)
- Case 5
- knob1.ScaleStopAngle = hscroll1(5)
- label2(5) = hscroll1(5)
- End Select
- End Sub
- Sub HScroll1_Scroll (Index As Integer)
- Select Case Index
- Case 0
- If (hscroll1(0) > knob1.ScaleMinValue) Then
- knob1.ScaleMaxValue = hscroll1(0)
- knob1.TicStopValue = knob1.ScaleMaxValue + .1
- Else
- hscroll1(0) = knob1.ScaleMaxValue
- End If
- label2(0) = knob1.ScaleMaxValue
- Case 1
- If (hscroll1(1) < knob1.ScaleMaxValue) Then
- knob1.ScaleMinValue = hscroll1(1)
- knob1.TicStartValue = knob1.ScaleMinValue
- Else
- hscroll1(1) = knob1.ScaleMinValue
- End If
- label2(1) = knob1.ScaleMinValue
- Case 2
- knob1.ScaleOriginX = hscroll1(2) / 100
- label2(2) = hscroll1(2) / 100
- Case 3
- knob1.ScaleOriginY = hscroll1(3) / 100
- label2(3) = hscroll1(3) / 100
- Case 4
- knob1.ScaleStartAngle = hscroll1(4)
- label2(4) = hscroll1(4)
- Case 5
- knob1.ScaleStopAngle = hscroll1(5)
- label2(5) = hscroll1(5)
- End Select
- End Sub
- Sub Option2_Click (Index As Integer)
- knob1.ScaleDirection = Index
- End Sub
-